<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<!-- /**  
 * @Author: Wang Hongbin  
 * @Email:   wanghongbin@ngoos.org  
 * @Date:   2018-06-21 14:28:22  
 * @Last Modified by:   Wang Hongbin  
 * @Last Modified time: 2018-06-21 14:28:22  
 */ -->  
<f:section name="main">

<f:flashMessages />

<div class="portlet light ">
    <div class="portlet-title">
        <div class="caption">
        	<f:link.action action="mylist" arguments="{excelExport: 1, keyword:keyword,useruid:useruid}" class="btn btn-info">导出</f:link.action>
        </div>
        <div class="actions">
            <div class="btn-group btn-group-devided">
                <f:form action="mylist" name="search" class="form-inline">
                    <div class="input-group">
                        <div class="input-icon">
                            <i class="fa fa-search"></i>
                            <f:form.hidden name="useruid" value="{useruid}"/>
                            <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
                        </div>
                        <span class="input-group-btn">
                            <f:form.submit class="btn btn-success" value="搜" />
                        </span>
                    </div>
                    <div class="input-group">
                        <span class="input-group-btn">
                            <f:link.page pageUid="{settings.page}" class="btn btn-info">返回</f:link.page>
                        </span>
                    </div>
                </f:form>
            </div>
        </div>
        <div class="portlet-body">
            <div class="table-scrollable">
            	<f:widget.paginate objects="{signups}" as="signupsPagination"  configuration="{settings.paginate}">
	            	<table class="tx_projectsystem table table-hover table-light">
						<thead>
							<tr class="uppercase">
								<th>序号</th>
								<th>活动名称</th>
								<th>活动类别</th>
								<th>活动标签</th>
								<th>活动地点</th>
								<th>活动时间</th>
								<th>签到时间</th>
							</tr>
						</thead>
	                    <tbody>
							<f:for each="{signupsPagination}" as="signup" iteration="itemIteration1">
							<tr>
	                            <td>
	                            	{f:cObject(typoscriptObjectPath:'lib.calc', data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
	                            </td>
								<td>{signup.activityuid.name}</td>
								<td>{signup.activityuid.types.name}</td>
								<td>{signup.activityuid.tagname}</td>
								<td>{signup.activityuid.address}</td>
								<td>
									<f:if condition="{signup.activityuid.way}==0">
										<f:then>
											{signup.activityuid.sttime->f:format.date(format:'Y-m-d H:i')}——{signup.activityuid.overtime->f:format.date(format:'Y-m-d H:i')}
										</f:then>
										<f:else>
											<f:for each="{weeks}" as="week">
												<f:if condition="{week.uid}=={signup.activityuid.week}">
													{week.name}
												</f:if>
											</f:for>
											{signup.activityuid.hour}
										</f:else>
									</f:if>
								</td>
								<td>{signup.signtime->f:format.date(format:'Y-m-d H:i')}</td>
							</tr>
							</f:for>
						</tbody>
					</table>
				</f:widget.paginate>
			</div>
        </div>
    </div>
</div>
</f:section>
</html>